package org.xg.study.pd.impl;

import org.xg.study.pd.CacheService;
import org.xg.study.pd.RedisUtils;

import java.util.concurrent.TimeUnit;

/**
 * @author CMG
 * @version 1.0
 * @cLassName CacheServiceImpl
 * @description
 * @date 2021/9/9 13:56
 **/
public class CacheServiceImpl implements CacheService {
    private RedisUtils redisUtils = new RedisUtils();

    @Override
    public String get(String key) {
        return redisUtils.get(key);
    }

    @Override
    public void set(String key, String value) {
        redisUtils.set(key, value);
    }

    @Override
    public void set(String key, String value, long timeout, TimeUnit timeUnit) {
        redisUtils.set(key, value, timeout, timeUnit);
    }

    @Override
    public void del(String key) {
        redisUtils.del(key);
    }
}
